<template>
  <el-dialog title="整改建议" v-bind="$attrs" width="1200px">
    <super-form
      label-width="150px"
      size="middle"
      form-ref="modalForm"
      :form-data="formData"
      :render-form-item="renderFormItem"
      :form-buttons="formButtons"
    />
    <div class="suggest">
      <p>关于 xxx的整改建议:</p>
      <div>
        1.
        物业公司水暖部对南院航海学院楼暖气管网进行检查，已提出了室外供暖管道改造的方案，申请专项经费。待经费落实后，将进行室外供暖管道改造
      </div>
      <div>
        2.
        物业公司水暖部对南院航海学院楼暖气管网进行检查，已提出了室外供暖管道改造的方案，申请专项经费。待经费落实后，将进行室外供暖管道改造
      </div>
      <div>
        3.
        物业公司水暖部对南院航海学院楼暖气管网进行检查，已提出了室外供暖管道改造的方案，申请专项经费。待经费落实后，将进行室外供暖管道改造
      </div>
      <div>
        4.
        物业公司水暖部对南院航海学院楼暖气管网进行检查，已提出了室外供暖管道改造的方案，申请专项经费。待经费落实后，将进行室外供暖管道改造
      </div>
    </div>
  </el-dialog>
</template>

<script>
import SuperForm from '@/components/SuperForm'
import { updateFormItem } from './config'

export default {
  name: 'DeviceUpdate',
  components: { SuperForm },
  props: {
    deviceCodeDisabled: {
      type: Boolean,
      default: false
    },
    formData: {
      type: Object,
      default: () => ({})
    },
    handleSubmit: {
      type: Function,
      default: () => {}
    }
  },
  data() {
    return {
      renderFormItem: updateFormItem,
      formButtons: {
        isDialog: true,
        resetName: '关闭',
        resetCallback: () => this.$emit('update:visible', false)
      }
    }
  },
  watch: {
    deviceCodeDisabled: {
      handler: function() {
        this.renderFormItem = updateFormItem(this.deviceCodeDisabled)
      },
      immediate: true
    }
  },
  methods: {}
}
</script>

<style lang="scss" scoped></style>
